package mx.com.matersys.vacs.domain;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(versionField = "", table = "consulta")
public class Consulta {
	@Id
	@TableGenerator(name="GEN_CONSULTA", table="sequence", pkColumnName="SEQ_NAME", valueColumnName="SEQ_COUNT", pkColumnValue="SEQ_CONSULTA", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="GEN_CONSULTA")
    @Column(name = "idconsulta")
    private Integer idconsulta;
	
	@ManyToOne
    @JoinColumn(name = "idespecialista", referencedColumnName = "idespecialista", nullable = false)
    private Especialista idespecialista;
    
    @ManyToOne
    @JoinColumn(name = "idpaciente", referencedColumnName = "id_paciente", nullable = false)
    private Paciente idpaciente;
    
    @Column(name = "fechaConsulta")
    @NotNull
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Date fechaConsulta;
    
    @Column(name = "peso", length = 15)
    private String peso;
    
    @Column(name = "talla", length = 45)
    private String talla;
    
    @Column(name = "tensionArterial", length = 45)
    private String tensionArterial;
    
    @Column(name = "alergias", length = 250)
    private String alergias;
    
    @Column(name = "frecuenciaCardiaca", length = 45)
    private String frecuenciaCardiaca;
    
    @Column(name = "glucosa", length = 45)
    private String glucosa;
    
    @Column(name = "notas", length = 500)
    private String notas;
    
    @Column(name = "diagnostico", length = 250)
    private String diagnostico;
    
    @Column(name = "tratamiento", length = 250)
    private String tratamiento;
    
    @Column(name = "dietaEjercicios", length = 300)
    private String dietaEjercicios;

	
    
}
